﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Solution.Business.Entities;

namespace Solution.Data
{
    public class LegalDAC
    {
        SolutionEntities context = SolutionEntities.Context;
        public List<Legal> Legal_GetByTop(string Top, string Where, string Ord)
        {
            var list = context.Legal_GetByTop(Top, Where, Ord);
            return list.ToList();
        }

        public void Legal_Insert(Legal legal)
        {
            context.Legal_Insert(legal.Name, legal.Order, legal.Active);
        }

        public void Legal_Update(Legal legal)
        {
            context.Legal_Update(legal.LgId, legal.Name, legal.Order, legal.Active);
        }
    }
}
